package com.zrj.gulimall.service;

import com.zrj.gulimall.to.SeckillSkuRedisTo;

import java.util.List;

/**
 * @author zhaorujie
 * @version 1.0
 * @Description
 * @date 2021/2/27 11:53
 */
public interface SeckillService {
    List<SeckillSkuRedisTo> getCurrentSeckillSkus();

    /**
     * 根据skuId查询商品是否参加秒杀活动
     * @param skuId
     * @return
     */
    SeckillSkuRedisTo getSkuSeckilInfo(Long skuId);

    /**
     * 商品进行秒杀(秒杀开始)
     * @param killId
     * @param key
     * @param num
     * @return
     */
    String kill(String killId, String key, Integer num) throws InterruptedException;

    /**
     * 上架三天需要秒杀的商品
     */
    void uploadSeckillSkuLatest3Days();
}
